<template>
    <div class="container" @click="showDetail">
      <div class="wrapper">
      <swiper :options="swiperOption">
        <swiper-slide v-for="(gallery,index) of galleryList" :key="index">
        <img class="gallery-img" :src="gallery" alt="">
        </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
      </swiper>
      </div>
    </div>
</template>

<script>
export default {
  name: 'Gallery',
  props: {
    galleryList: Array
  },
  methods: {
    showDetail () {
      this.$emit('showDetail')
    }
  },
  data () {
    return {
      swiperOption: {
        loop: false,
        pagination: '.swiper-pagination',
        paginationType: 'fraction',
        observeParents: true,
        observer: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
  .container >>> .swiper-container
    overflow: inherit
  .container
    background #000000
    display flex
    flex-direction column
    justify-content center
    position fixed
    height 100%
    width 100%
    overflow hidden
    .swiper-pagination
      bottom -3rem
      color: #fff
    .wrapper
      .gallery-img
        width 100%
</style>
